package com.cnciems.lakekb.config;

import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @version V1.0
 * @program: lake-kb
 * @package: com.cnciems.lakekb.config
 * @description: 类描述
 * @author: HHJ
 * @dep STATE GRID XIONG AN DIGITAL TECHNOLOGY Co.,Ltd
 * @create: 2021-05-24 14:02
 **/
@Configuration
@MapperScan(basePackages = "com.cnciems.lakekb.course.mapper")
public class MybatisPlusConfig {
    @Bean
    public MybatisPlusInterceptor mybatisPlusInterceptor(){
        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
        interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.H2));
        return interceptor;
    }
}
